package com.lkd.controller;


import com.lkd.service.VendingMachineService;
import com.lkd.vo.PageBean;
import com.lkd.vo.Result;
import com.lkd.vo.VendingMachineVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 聂德祥
 * @since 2024-08-19
 */
@RestController
public class VendingMachineController {
    @Autowired
    private VendingMachineService vendingMachineService;
@GetMapping("/api/vm-service/vm/search")
    public Result getVmByPage(String innerCode, @RequestParam(defaultValue = "1") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize){
    PageBean<VendingMachineVo> vmByPage =vendingMachineService.getVmByPage(innerCode,pageIndex,pageSize);
    return Result.success(vmByPage);
}
}
